/* jshint indent: 2 */

module.exports = function(sequelize, DataTypes) {
  return sequelize.define('fUserVip', {
    id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true,
      field: 'id'
    },
    userId: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      field: 'user_id'
    },
    beginDate: {
      type: DataTypes.DATE,
      allowNull: true,
      field: 'begin_date'
    },
    endDate: {
      type: DataTypes.DATE,
      allowNull: true,
      field: 'end_date'
    },
    level: {
      type: DataTypes.INTEGER(1),
      allowNull: true,
      defaultValue: '0',
      field: 'level'
    },
    lastSignDate: {
      type: DataTypes.DATE,
      allowNull: true,
      field: 'last_sign_date'
    }
  }, {
    tableName: 'f_user_vip'
  });
};
